#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <opencv.hpp>
#include <QTimer>
#include <QDateTime>
#include <QDebug>

#include <seeta/QualityAssessor.h>
#include <seeta/FaceRecognizer.h>
#include <seeta/FaceEngine.h>
#include <seeta/FaceTracker.h>
#include <seeta/Struct_cv.h>
#include <seeta/Struct.h>

#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include <array>
#include <map>
#include <iostream>

using namespace  cv;

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void timerEvent(QTimerEvent * event);
    void Show_cap_image(int mode);
    void show_live_num(int operate);

private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

    void on_pushButton_10_clicked();

    void on_pushButton_11_clicked();

    void on_pushButton_12_clicked();

    void on_pushButton_13_clicked();

    void on_pushButton_15_clicked();

    void on_pushButton_14_clicked();

private:
    Ui::MainWindow *ui;
    cv::Mat image;
    cv::VideoCapture cap;
    cv::CascadeClassifier casc;
    /*seeta's dev*/

    // 初始化
    seeta::FaceTracker * FD;
    seeta::FaceEngine * engine;
    seeta::QualityAssessor QA;
    std::vector<std::string> GalleryImageFilename;

    // 容器（ 保存索引号，保存图片路径名 ）
    std::map<int64_t, std::string> GalleryIndexMap;
    // recognization threshold 相似度阈值
    float threshold = 0.5f;

};
#endif // MAINWINDOW_H
